
public class EmployeeRate extends Employee {

    private double fixSalary;

    public EmployeeRate(String name, double fixSalary) {
        super(name);
        this.fixSalary = fixSalary;
    }

    public double calculateSalary() {
        return fixSalary;
    }

    double getFixSalary() {
        return this.fixSalary;

    }

    @Override
    public String toString() {
        return "id: " + this.getId()
                + "\nName: " + this.getName()
                + "\nOccupations: " + this.getClass().getName()
                + "\nSalary: " + this.getFixSalary()
                + "\nMonthly pay: " + this.calculateSalary();
    }
}
